<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel='shortcut icon' href='{% if config.brand.favicon == "" %}{{ config.url }}/adios/assets/images/favicon.png{% else %}{{ config.brand.favicon }}{% endif %}'>
  <title>{{ config.brand.title }}</title>
  <script src='{{ config.url }}/adios/cache.js'></script>
  <link rel=stylesheet type='text/css' href='{{ config.url }}/adios/cache.css' rel="stylesheet">
  {% if config.skin != '' %}
    <link rel=stylesheet type='text/css' href='{{ config.url }}/adios/assets/css/Skins/{{ config.skin }}.css' rel="stylesheet">
  {% endif %}
</head>

<body>

  <div class="container">

    <!-- Outer Row -->
    <div class="row justify-content-center">

      <div class="col-xl-10 col-lg-12 col-md-9">

        <div class="card o-hidden border-0 shadow-lg my-5">
          <div class="card-body p-0">
            <!-- Nested Row within Card Body -->
            <div class="row">
              <div
                class="col-lg-6 d-none d-lg-block bg-login-image"
                style="background-image: url('{{ config.brand.login.splash }}')"
              >
              </div>
              <div class="col-lg-6">
                <div class="p-5">
                  <div class="text-center">
                    <h1 class="h4 mb-0">{{ config.brand.title }}</h1>
                    <p class="mb-4">{{ config.brand.headline }}</p>
                  </div>
                  {% if token.status == 'success' %}
                    <form class="user" id="reset_password_new" action="" method=POST>
                      <input type="hidden" name='language' id='language' value='{{ config.language }}'>
                      <input type="hidden" name='passwordResetNewPassword' id='passwordResetNewPassword' value='1'>

                      <div class="form-group">
                        <input
                          type='password'
                          name='new_password'
                          id='new_password'
                          class='form-control form-control-user {% if userPasswordReset.error %} is-invalid {% endif %}'
                          placeholder="{{ translate('New password') }}"
                          autofocus
                          onkeypress='
                            if (event.keyCode == 13) {
                              document.getElementById("reset_password_new").submit();
                            }
                          '
                        />
                      </div>
                      <div class="form-group">
                        <input
                          type='password'
                          name='new_password_2'
                          id='new_password_2'
                          class='form-control form-control-user {% if userPasswordReset.error %} is-invalid {% endif %}'
                          placeholder="{{ translate('Repeat new password') }}"
                          autofocus
                          onkeypress='
                            if (event.keyCode == 13) {
                              document.getElementById("reset_password_new").submit();
                            }
                          '
                        />
                      </div>
                      <a
                        href="javascript:void(0)"
                        onclick='document.getElementById("reset_password_new").submit();'
                        class="btn btn-primary btn-user btn-block"
                      >
                        {{ translate("Set a new password") }}
                      </a>
                      <div class="mt-4 text-center">
                        {{ config.build.version }}
                      </div>
                    </form>
                  {% elseif not userPasswordReset or userPasswordReset.error %}
                    <form class="user" id="password_reset_form" action="" method=POST>
                      <input type="hidden" name='language' id='language' value='{{ config.language }}'>
                      <input type="hidden" name='passwordReset' id='passwordReset' value='1'>

                      <div class="form-group">
                        <input
                          type='text'
                          name='email'
                          id='email'
                          class='form-control form-control-user {% if userPasswordReset.error %} is-invalid {% endif %}'
                          placeholder='E-mail'
                          autofocus
                          onkeypress='
                            if (event.keyCode == 13) {
                              document.getElementById("password_reset_form").submit();
                            }
                          '
                        />
                      </div>
                      <a
                        href="javascript:void(0)"
                        onclick='document.getElementById("password_reset_form").submit();'
                        class="btn btn-primary btn-user btn-block"
                      >
                        {{ translate("Send recovery email") }}
                      </a>
                      <div class="mt-4 text-center">
                        {{ config.build.version }}
                      </div>
                    </form>
                  {% else %}
                    <p class="reset-password-notification mb-5">
                      {{ translate("A verification email has been sent.") }}
                    </p>
                  {% endif %}
                  {% if userPasswordReset.error %}
                    <div class='small mt-4 text-danger text-center'>
                      {{ userPasswordReset.errorMessage }}
                    </div>
                  {% endif %}
                </div>
              </div>
            </div>
          </div>
        </div>

      </div>

    </div>

  </div>

</body>

</html>
